package cn.piesat.vo.resource;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 修改资源信息参数类+
 *
 * @author xhl
 */
public class UpdateResourceVO {

    @NotBlank(message = "ID不能为空")
    private String id;

    /**
     * 资源名称
     */
    @NotBlank(message = "名称不能为空")
    private String name;

    /**
     * 资源信息（按钮：按钮标识；接口：请求地址）
     */
    @NotBlank(message = "资源信息不能为空")
    private String resource;

    /**
     * 资源类型（按钮：button；接口：interface）
     */
    @NotBlank(message = "资源类型不能为空")
    private String type;

    /**
     * 菜单ID
     */
    private String menuId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    private Integer status;
    private Integer logStatus;

    @Override
    public String toString() {
        return "UpdateResourceVO{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", resource='" + resource + '\'' +
                ", type='" + type + '\'' +
                ", menuId='" + menuId + '\'' +
                ", createTime=" + createTime +
                ", status=" + status +
                ", logStatus=" + logStatus +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getResource() {
        return resource;
    }

    public void setResource(String resource) {
        this.resource = resource;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getLogStatus() {
        return logStatus;
    }

    public void setLogStatus(Integer logStatus) {
        this.logStatus = logStatus;
    }
}
